home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc1 / firdesgn.lha / firdesigner / FIRDesigner.install < prev    next >
Text File  |  1996-03-04  |  6KB  |  203 lines

  1. ; *************************************************************************
  2. ; ******************  FIRDesigner Installation Script  ********************
  3. ; *************************************************************************
  4. ;
  5. ; $VER: FIRDesigner.install 1.1 (04.03.96)
  6. ;
  7. ; Copyright ©1996 Harald Zottmann
  8. ;
  9. ; *************************************************************************
  10. ;
  11.  
  12.  
  13. ; ------------------------------------------------------------------------
  14. ; Find out about program version.
  15.  
  16.     (set vernum-fir    (getversion "FIRDesigner"))
  17.     (set version-fir   (/ vernum-fir 65536))
  18.     (set revision-fir  (- vernum-fir (* version-fir 65536) ) )
  19.  
  20. ; ------------------------------------------------------------------------
  21. ; Set default destination directory.
  22.  
  23.     (set def-fir-dir "SYS:")
  24.  
  25. ; ------------------------------------------------------------------------
  26. ; Init some strings.
  27.  
  28.     (set #yes-msg "Yes")
  29.     (set #no-msg "No")
  30.  
  31.     (set #bad-kick-msg 
  32.         "The FIRDesigner requires AmigaOS 2.04 or better !"
  33.     )
  34.  
  35.     (set #hello-msg
  36.         (cat
  37.         ("Welcome to the FIRDesigner V%ld.%ld\n\n" version-fir revision-fir)
  38.         "This script will install the FIRDesigner and "
  39.         "related files on your Amiga.\n\n"
  40.         "You will need to answer a few questions such as "
  41.         "where you would like the program installed.\n\n"
  42.         "If you do not wish to install the FIRDesigner at this time, "
  43.         "select the 'Abort Install' button now. "
  44.         )
  45.     )
  46.  
  47.     (set #goodbye-msg
  48.         (cat
  49.         "The installation of the FIRDesigner is now complete. "
  50.         "Have a look at the guides to get more information "
  51.         "about this powerful tool.\n\n" 
  52.         "Don`t forget to register if you use the FIRDesigner "
  53.         "frequently. See the docs for more information.\n\n"
  54.         "Have fun..."
  55.         )
  56.     )
  57.  
  58.     (set #shortbye-msg
  59.         (cat
  60.         "Don`t forget to register if you use the FIRDesigner "
  61.         "frequently. See the docs for more information.\n\n"
  62.         "Have fun..."
  63.         )
  64.     )
  65.  
  66.     (set #fir-askdir-msg 
  67.         (cat
  68.         "Select the directory to install the FIRDesigner in. "
  69.         "If you want to create a new directory for this "
  70.         "application, do so now.\n"
  71.         )
  72.     )
  73.  
  74.     (set #processor-msg
  75.         (cat
  76.         "The FIRDesigner is optimized for the listed "
  77.         "processor types. Please indicate "
  78.         "which processor you have in your machine."
  79.         "\n--------------------------\n"
  80.         "The Installer found out that you have a\n"
  81.         "MC " (database "cpu") " CPU\n"
  82.         )
  83.     )
  84.  
  85.     (set #processor-help
  86.         (cat
  87.         "There are three optimized versions of "
  88.         "the FIRDesigner available. "
  89.         "Simply specify the processor (CPU) of your machine. "
  90.         "For example if you have a stock A1200 or "
  91.         "A4000/030, choose MC 68020. For an A4000/040 "
  92.         "you may choose MC 68040. Older machines without "
  93.         "accelerator boards, like A500 or A2000 must "
  94.         "choose the MC 68000. "
  95.         "The Installer program however found out that "
  96.         "your machine is equipped with a MC "
  97.         (database "cpu") " CPU. "
  98.         "If you are not sure about that, choose the "
  99.         "MC 68000 version, that runs on every machine."
  100.         )
  101.     )
  102.  
  103.  
  104. ; ************************************************************************
  105. ; Begin actual installation
  106. ; ************************************************************************
  107.  
  108. ; ------------------------------------------------------------------------
  109. ; Check for KickV37 or better.
  110.  
  111.     (if (< (/ (getversion) 65536) 37)
  112.         (
  113.         (abort #bad-kick-msg)
  114.         )
  115.     )
  116.  
  117.  
  118. ; ------------------------------------------------------------------------
  119. ; Print the welcome message.
  120.  
  121.     (message #hello-msg)
  122.  
  123.  
  124. ; ------------------------------------------------------------------------
  125. ; Ask the user where we should install the FIRDesigner.
  126.  
  127.     (if (= 0 @user-level)
  128.         (
  129.         (set firdir        (tackon @default-dest "FIRDesigner") )
  130.         (set @default-dest firdir)
  131.         (makedir firdir)
  132.         (copyfiles (source "/FIRDesigner") (dest firdir) (infos) (all))
  133.         (exit (#shortbye-msg)) 
  134.         )
  135.     )
  136.  
  137.  
  138.     (set firdir
  139.         (askdir
  140.             (prompt #fir-askdir-msg)
  141.             (help @askdir-help)
  142.             (default def-fir-dir)
  143.         )
  144.     )
  145.  
  146.     (set @default-dest firdir)
  147.  
  148. ; ------------------------------------------------------------------------
  149. ; Ask which processor version to be installed.
  150.  
  151.     (set procversion
  152.         (askchoice
  153.             (prompt #processor-msg)
  154.             (help #processor-help)
  155.             (choices
  156.                 "MC 68000"
  157.                 "MC 68020"
  158.                 "MC 68040"
  159.             )
  160.             (default 0)
  161.         )
  162.     )
  163.     (if (= 0 procversion)
  164.         ((copyfiles (source "FIRDesigner") (dest firdir) (infos))
  165.         )
  166.     )
  167.     (if (= 1 procversion)
  168.         ((copyfiles (source "FIRDesigner_020")  (dest firdir))
  169.          (copyfiles (source "FIRDesigner.info") (dest firdir))
  170.          (rename (tackon firdir "FIRDesigner_020") (tackon firdir "FIRDesigner"))
  171.         )
  172.     )
  173.     (if (= 2 procversion)
  174.         ((copyfiles (source "FIRDesigner_040")  (dest firdir))
  175.          (copyfiles (source "FIRDesigner.info") (dest firdir))
  176.          (rename (tackon firdir "FIRDesigner_040") (tackon firdir "FIRDesigner"))
  177.         )
  178.     )
  179.  
  180. ; ------------------------------------------------------------------------
  181. ; Install the documentation.
  182.  
  183.         (copyfiles (source "FIRDesigner.guide")         (dest firdir) (infos) )
  184.         (copyfiles (source "FIRDesigner.readme")        (dest firdir) (infos) )
  185.  
  186. ; ------------------------------------------------------------------------
  187. ; Install the examples.
  188.  
  189.         (copyfiles (source "Bandpass.FIR")            (dest firdir) )
  190.         (copyfiles (source "Differentiator.FIR")      (dest firdir) )
  191.         (copyfiles (source "Hilbert.FIR")             (dest firdir) )
  192.         (copyfiles (source "Lowpass.FIR")             (dest firdir) )
  193.         (copyfiles (source "Highpass.FIR")            (dest firdir) )
  194.         (copyfiles (source "Multipass.FIR")           (dest firdir) )
  195.         (copyfiles (source "Notch.FIR")               (dest firdir) )
  196.  
  197.  
  198. ; ------------------------------------------------------------------------
  199. ; Print the goodbye message
  200.  
  201.         (message #goodbye-msg)
  202.  
  203.